package com.wf.smartcomm.server.bean;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

/** 
 * @author 38884306@qq.com  
 * @version ����ʱ�䣺2015-5-18 ����3:04:07 
 * 
 */
@Entity
@Table(name = "t_praise")
public class Praise {
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;
	
	@Expose
	@Column(length = 32)
	private String subject;
	
	@Expose
	@Column(length = 3200)
	private String content;
	
	@Expose
	@OneToMany(mappedBy = "praise",fetch = FetchType.EAGER)
	private Set<ThumbImage> thumbImages;
	
	@ManyToOne
	@JoinColumn(name = "uid")
	private User user;
	
	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Set<ThumbImage> getThumbImages() {
		return thumbImages;
	}

	public void setThumbImages(Set<ThumbImage> thumbImages) {
		this.thumbImages = thumbImages;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(String createdAt) {
		this.createdAt = createdAt;
	}

	@Expose
	@Column(length = 20)
	private String createdAt;
}
